package com.bnlr.lrparking.appui.mine.recentparkrecord;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.blankj.utilcode.util.LogUtils;
import com.bnlr.lrparking.R;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * description: TODO
 * ReceiptRecycleViewAdapter class
 *
 * @author : Licy
 * @date : 2018/12/29
 */
public class ReceiptRecycleViewAdapter extends BaseQuickAdapter<String, BaseViewHolder> {

    List<String> mData;

    public ReceiptRecycleViewAdapter(int layoutResId, @Nullable List<String> data) {
        super(layoutResId, data);
        this.mData = data;
    }

    public ReceiptRecycleViewAdapter(@Nullable List<String> data) {
        super(data);
    }

    public ReceiptRecycleViewAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    public int getItemCount() {
        return mData.size();
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, String url) {

        LogUtils.e(url);

        Glide.with(mContext)
                .load(url)
                .into((ImageView) baseViewHolder.getView(R.id.item_receipt_img));

    }
}
